package com.qfedu.yanglao20app.guardian.controller;

import com.qfedu.yanglao20.common.CommonResult;
import com.qfedu.yanglao20app.guardian.service.GuardianService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@Api(tags = "监护人终端登录")
@RestController
@RequestMapping("app/auardian")
public class GuardianLoginController {

    @Resource
    private GuardianService guardianService;

    @ApiOperation(value = "登录", notes = "")
    @GetMapping("/login")
    public CommonResult login(@ApiParam(value = "姓名") String name, @ApiParam(value = "手机号") String phone) {
        String jwt = guardianService.login(name, phone);
        return CommonResult.success(jwt);
    }

}
